# coding: utf-8
# Author: legend
# @Time： 2021/3/8 上午10:04
from django.db import models


class Interviewer(models.Model):
    id = models.AutoField(primary_key=True)
    user_name = models.CharField(default='', max_length=20)
    email = models.EmailField()
    phone_number = models.CharField(default='', max_length=11, null=False, unique=True)
    answer = models.TextField(default='')

    class Meta:
        db_table = 'interviewer'


class Questions(models.Model):
    QUESTION_TYPE = (
        (0, 'single'),
        (1, 'multiple'),
    )

    question = models.CharField(default='', max_length=200, null=False)
    value = models.SmallIntegerField(null=False)
    type = models.SmallIntegerField(choices=QUESTION_TYPE)
    index = models.IntegerField(null=True)

    class Meta:
        db_table = 'questions'
